<template>
  <div class="p-15px">
    Six<br /><br />
    <el-button type="primary" plain @click="mockTest">Mock测试</el-button>
    <el-button type="primary" plain @click="mockTest">后端测试</el-button>
  </div>
</template>

<script setup lang="ts">
import { koiLogin } from "@/api/system/user/index.ts";
import { onMounted } from "vue";
import {
  koiSessionStorage,
  koiLocalStorage,
  koiCookie,
} from "@/utils/storage.ts";

const mockTest = async () => {
  const loginParams = {
    username: "koi",
    password: "123456",
  };
  const res = await koiLogin(loginParams);
  console.log("登录🌻", res);
};

// const demoTest = async () => {
//   const response = await testDemo();
//   console.log("测试🌻", response);
// };

onMounted(() => {
  const sessionValue = koiSessionStorage.get("tabs");
  const localValue = koiLocalStorage.get("test");
  koiCookie.put("test", "测试cookie");
  console.log("测试session", sessionValue);
  console.log("测试local", localValue);
  console.log("测试cookie", koiCookie.get("test"));
});
</script>

<style scoped></style>
@/api/system/user
